//
//  HYSendPicturesAndTextCell.m
//  child
//
//  Created by lijianguomac on 13-10-7.
//  Copyright (c) 2013年 lijianguomac. All rights reserved.
//

#import "HYSendPicturesAndTextCell.h"

@implementation HYSendPicturesAndTextCell

- (void)dealloc{
    [super dealloc];
    [tfMessage release];
    [view release];
    [viewMessage release];
}

- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self myInit];
    }
    return self;
}

- (void)myInit{
    
    CGRect frame = CGRectMake(0, 0, 280, 100);
    
    tfMessage = [[UITextView alloc] initWithFrame:frame];
//    [tfMessage setTextAlignment:<#(NSTextAlignment)#>]
    tfMessage.placeholder = @"添加图片描述...";
    
    frame = CGRectMake(20, 20, 280, 100);
    viewMessage = [[UIView alloc] initWithFrame:frame];

    viewMessage.backgroundColor = [UIColor whiteColor];
    
    [Tool setViewShadow:viewMessage borderWidth:1];
    
    [viewMessage addSubview:tfMessage];
    [self addSubview:viewMessage];
    
    frame = CGRectMake(20, 20, 280, 160);
    view = [[UIView alloc] initWithFrame:frame];
 
    [Tool setViewShadow:view borderWidth:1];
    view.backgroundColor = [UIColor whiteColor];
    [self addSubview:view];
}

- (void)setView:(int)row{
    if(row==0){
        view.hidden = YES;
        viewMessage.hidden = NO;
    }else{
        view.hidden = NO;
        viewMessage.hidden = YES;
    }
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated
{
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
